{layout name="layout" /}
<div class="row">
    <div class="col-md-3">
        <!-- Profile Image -->
        <div class="box box-primary">
            <div class="box-body box-profile">
                <img alt="User profile picture" class="profile-user-img img-responsive img-circle" src="{$u_info.avatar|default='/static/img/headicon.png'}">
                    <h3 class="profile-username text-center">
                        {$u_info.user_name}
                    </h3>
                    <p class="text-muted text-center">
                        {$u_auth.auth_name}
                    </p>
                    <ul class="list-group list-group-unbordered">
                        <li class="list-group-item">
                            <b>
                                金币：
                            </b>
                            <a class="pull-right">
                                {:number_format($u_info['coin'], 2)}
                            </a>
                        </li>
                        <li class="list-group-item">
                            <b>
                                积分：
                            </b>
                            <a class="pull-right">
                                {:number_format($u_info['score'], 2)}
                            </a>
                        </li>
                    </ul>
                    <a class="btn btn-primary btn-block" target="_top" href="{:url('home/login/logout')}">
                        <b>
                            退出登录
                        </b>
                    </a>
                </img>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
    <!-- /.col -->
    <div class="col-md-9">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a data-toggle="tab" href="#settings">
                        信息修改
                    </a>
                </li>
                <li>
                    <a class="loglist" data-toggle="tab" href="#loglist">
                        登录情况
                    </a>
                </li>
                <li>
                    <a class="coindetail" data-toggle="tab" href="#coindetail">
                        金币明细
                    </a>
                </li>
                <li>
                    <a class="scoredetail"  data-toggle="tab" href="#scoredetail">
                        积分明细
                    </a>
                </li>
            </ul>
            <div class="tab-content">
                <!-- /.tab-pane -->
                <div class="tab-pane active" id="settings">
                    <form class="form-horizontal ingeAjax" method="post" action="{:url('home/User/edit_profile')}">
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputName">
                                昵称：
                            </label>
                            <div class="col-sm-10">
                                <input class="form-control" name="user_nicename" type="text" value="{$u_info.user_nicename|default=''}">
                                </input>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 密码： </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-group-new  col-xs-12 col-sm-4" placeholder="请输入密码,不修改留空"    name="user_pwd" value="" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputEmail">
                                邮箱：
                            </label>
                            <div class="col-sm-10">
                                <input class="form-control" name="email" type="email" value="{$u_info.email|default=''}">
                                </input>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputName">
                                手机号：
                            </label>
                            <div class="col-sm-10">
                                <input class="form-control" name="mobile" value="{$u_info.mobile|default=''}" type="text">
                                </input>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputName">
                                性别：
                            </label>
                            <div class="col-sm-10">
                            {switch name="$u_info['sex']"}
                                {case value="0"}<input type="radio" class="flat-blue" name="sex" checked value="0">保密
                                <input type="radio" class="flat-blue" name="sex" value="1">男
                                <input type="radio" class="flat-blue" name="sex" value="2">女{/case}
                                {case value="1"}<input type="radio" class="flat-blue" name="sex"  value="0">保密
                                <input type="radio" class="flat-blue" name="sex" checked value="1">男
                                <input type="radio" class="flat-blue" name="sex" value="2">女{/case}
                                {case value="2"}<input type="radio" class="flat-blue" name="sex"  value="0">保密
                                <input type="radio" class="flat-blue" name="sex" value="1">男
                                <input type="radio" class="flat-blue" name="sex" checked value="2">女{/case}
                            {/switch}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputSkills">
                                个人网站：
                            </label>
                            <div class="col-sm-10">
                                <input class="form-control" name="user_url" value="{$u_info.user_url|default=''}" type="text">
                                </input>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="inputExperience">
                                个人签名：
                            </label>
                            <div class="col-sm-10">
                                <textarea class="form-control" name="signature" value="{$u_info.signature|default=''}">
                                </textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button class="btn btn-danger" type="submit">
                                    提交
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- /.tab-pane -->
                <div class="tab-pane" id="loglist">
                    <div class="box-body">
                        <div class="table-responsive">
                            <table id="staff" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>登录路径</th>
                                        <th>登录时间</th>
                                        <th>浏览器环境</th>
                                        <th>登录IP</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="loglist" id="vo"}
                                        <tr>
                                            <td>{$vo.log_id}</td>
                                            <td>{$vo.log_value}</td>
                                            <td>{$vo.log_time}</td>
                                            <td>{$vo.log_os}-{$vo.log_browser}</td>
                                            <td>{$vo.log_ip}</td>
                                        </tr>
                                    {/volist}
                                </tbody>
                                <!-- tbody是必须的 -->
                            </table>
                            {$loglist->render()}
                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="coindetail">
                    <div class="box-body">
                        <div class="table-responsive">
                            <table id="staff" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>排序</th>
                                        <th>ID</th>
                                        <th>分类名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                                <!-- tbody是必须的 -->
                            </table>
                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="scoredetail">
                    <div class="box-body">
                        <div class="table-responsive">
                            <table id="staff" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>排序</th>
                                        <th>ID</th>
                                        <th>分类名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                                <!-- tbody是必须的 -->
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.tab-content -->
        </div>
        <!-- /.nav-tabs-custom -->
    </div>
    <!-- /.col -->
</div>
<!-- /.row -->
<!-- /.content -->
{include file="public/base" /} {include file="public/edit" /}<script type="text/javascript">
    $('.{$type}').click();
</script> {include file="public/footer" /}
